package com.lottery.material.entity.article;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lottery.material.entity.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Description：文章活跃信息表（只会保留5天数据，专供热贴、足球、篮球查询使用）
 * Created by 朱正磊 on 2019-04-09 10:14
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "material_article_active_info")
public class ArticleActiveInfo extends BaseEntity {

    private static final long serialVersionUID = 4296659056706374294L;

    @Column(columnDefinition = "int(11) not null comment '圈子id（material_circle_info表主键）'")
    private Integer circleId;

    @Column(columnDefinition = "varchar(50) not null comment '用户id'")
    private String userId;

    @Column(columnDefinition = "varchar(10) comment '圈子二级菜单编号'")
    private String circleSecondMenuCode;

    @Column(columnDefinition = "varchar(50) comment '标题'")
    private String title;

    @Column(columnDefinition = "int(1) default '1' comment '是否进热贴（1：否；2：是）'")
    private Integer isHot;

    @Column(columnDefinition = "int(1) default '1' comment '是否收费（1：否；2：是）'")
    private Integer isCharge;

    @Column(columnDefinition = "decimal(19,2) comment '收费金额'")
    private BigDecimal chargeAmount;

    @Column(columnDefinition = "varchar(50) comment '免费内容排序规则'")
    private String freeContentOrderRule;

    @Column(columnDefinition = "varchar(50) comment '收费内容排序规则'")
    private String chargeContentOrderRule;

    @Column(columnDefinition = "int(1) default '1' comment '比赛结束是否公开（1：否；2：是；）'")
    private Integer isEndPublic;

    @Column(columnDefinition = "int(1) comment '文章状态（1：待审核；2：审核不通过/驳回；3：审核通过；）'")
    private Integer articleState;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '审核时间'")
    private Date auditTime;

    @Column(columnDefinition = "int(10) comment '点赞量'")
    private Integer likeTotal;

    @Column(columnDefinition = "int(10) comment '阅读量'")
    private Integer readTotal;

    @Column(columnDefinition = "int(10) comment '评论量'")
    private Integer commentTotal;

    @Column(columnDefinition = "int(1) default '1' comment '是否置顶（1：否；2：是）'")
    private Integer isTop;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '置顶时间'")
    private Date topTime;

    @Column(columnDefinition = "int(1) comment '是否推广（1：否；2：是）'")
    private Integer isPromotion;

    @Column(columnDefinition = "decimal(19,2) comment '推广金额'")
    private BigDecimal promotionAmount;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '推广时间'")
    private Date promotionTime;

    @Column(columnDefinition = "int(1) comment '是否存在赛事（1：否；2：是）'")
    private Integer isExistCompetition;

    @Column(columnDefinition = "int(1) comment '赛事是否结束（1：否；2：是）'")
    private Integer isCompetitionEnd;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '更新时间（只有文章审核时才不需要更新该字段的值，其它任何更新操作都需要修改该字段的值）'")
    private Date updateTime;

    @Column(columnDefinition = "int(1) default '1' comment '是否删除（1：否；2：是）'")
    private Integer isDelete;

    @Column(columnDefinition = "int(1) comment '锁状态（1：锁着；2：开锁）'")
    private Integer lockState;

}
